package com.shangqing.system.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface VegetationCaoyuanMapper {
    @Select("SELECT cityId  from prairie_city_vegetation   GROUP BY  cityId")
    List<Integer> selectcityid();

    @Select("SELECT vegetationid  from prairie_city_vegetation where cityId=#{id}  GROUP BY  vegetationid;")
    List<Integer> selectvegetationid(Integer id);

    @Select("SELECT sum(area)  from prairie_city_vegetation where cityId=#{id}")
    Integer selectcount(Integer id);

    @Select("SELECT area  from prairie_city_vegetation where cityId=#{cityId} and vegetationid=#{vegetationid} ")
    Integer selectcaoyuanleixing(@Param("cityId") Integer cityId, @Param("vegetationid") Integer vegetationid);
@Select("SELECT name  from prairie_vegetation where  id=#{cityId}  ")
    String selectById(Integer cityId);
}
